#include "log.h"

using namespace std;

logger* logger::getInstance()
{
    if(self == nullptr) {
        unique_lock<mutex> lock(selfMutex);
        if(self == nullptr) {
            self = new logger();
        }
    }
    return self;
}

logger* logger::self = nullptr;
mutex logger::selfMutex;
logger::logger()
{
}

void logger::log(const std::string& msg)
{
    std::cout << msg << std::endl;
}